package com.poster.exceptions;

import com.poster.enums.ResultCode;
import lombok.Getter;

@Getter
public class BusinessException extends RuntimeException {

    private final ResultCode code;

    private final String info;


    public BusinessException(ResultCode code, String info){
        this.code = code;
        this.info = info;
    }

    public BusinessException(ResultCode code){
        this.code = code;
        this.info = code.message();
    }
}
